//
//  LLNotice2TableViewCell.m
//  LoveLove
//
//  Created by wkf on 2019/4/2.
//  Copyright © 2019 wkf. All rights reserved.
//

#import "LLNotice2TableViewCell.h"

@implementation LLNotice2TableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initView];
    }
    return self;
}

- (void)initView{
    self.headImage = [[UIImageView alloc] initWithFrame:CGRectMake(15, 10, 36, 36)];
    self.headImage.image = [UIImage imageNamed:@"椭圆 1596"];
    self.headImage.layer.masksToBounds = YES;
    self.headImage.contentMode = UIViewContentModeScaleAspectFill;
    self.headImage.layer.cornerRadius = 18;
    [self.contentView addSubview:self.headImage];
    
    self.nameLabel = [LLInitBaseViewTool labelWithText:@"谁谁" textColor:LLColorRGB(49) font:18 textAlignment:NSTextAlignmentLeft];
    self.nameLabel.frame = CGRectMake(66, 10, LLScreenWidth-236, 18);
    [self.contentView addSubview:self.nameLabel];
    
    self.timeLabel = [LLInitBaseViewTool labelWithText:@"2018年11月11日 10：21" textColor:LLColorRGB(127) font:13 textAlignment:NSTextAlignmentLeft];
    self.timeLabel.frame = CGRectMake(LLScreenWidth-155, 10, 150, 13);
    [self.contentView addSubview:self.timeLabel];
    
    self.titleLabel = [LLInitBaseViewTool labelWithText:@"谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁谁" textColor:LLColorRGB(49) font:18 textAlignment:NSTextAlignmentLeft];
    self.titleLabel.numberOfLines = 0;
    CGFloat height = [CommonTools sizeOfText:self.titleLabel.text fontSize:18 width:LLScreenWidth-81 height:MAXFLOAT].height;
    self.titleLabel.frame = CGRectMake(66, 34, LLScreenWidth-81, height);
    [self.contentView addSubview:self.titleLabel];
    
    self.cellHeight = 44+height;
    
    self.subtitleLabel = [LLInitBaseViewTool labelWithText:@"《钢琴怎么谈？》" textColor:LLColorRGB(49) font:13 textAlignment:NSTextAlignmentLeft];
    self.subtitleLabel.frame = CGRectMake(66, self.cellHeight, LLScreenWidth-81, 13);
    [self.contentView addSubview:self.subtitleLabel];
    
    UIView *lineview = [[UIView alloc] initWithFrame:CGRectMake(66, self.cellHeight+33, LLScreenWidth-81, 1)];
    lineview.backgroundColor = LLColorRGB(243);
    [self.contentView addSubview:lineview];
    
    self.cellHeight = self.cellHeight+34;
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
